package com.lemox.main;

public class OIOString
{
	public static int string_2_int (String str)
	{
		int sum = 0;
		for (int i = 0; i < str.length(); i++)
		{
			sum *= 10;
			sum += ( str.charAt(i) - '0');
		}
		return sum;
	}
	
	/*
	 * main()
	 * */
	public static void main (String[] args)
	{
		System.out.println(string_2_int("123"));
	}
}
